<!DOCTYPE html>
<html>
{{render "comm/header.html"}}
<script type="text/javascript" >
	let parmas = {"appid":"389264577977647113","appkey":"3bacf371fea7c96309d8778042555248"}
	var thinkData = new ThinkData("http://www.ycvod.net/report", parmas["appid"], parmas["appkey"], 0)
	//for (let i = 1; i <= 10000; i++) {
	//thinkData.setSuperProperties({"name":"玩家造兵剑士"})
	thinkData.track("访问服务",{url_path:decodeURI(window.location.pathname)})
	thinkData.trackUserData()
</script>
<body>

	{{render "comm/top.html"}}

	<div class="container-fluid service-content-0">
		<div class="container">
			<ul class="col-md-10 col-lg-10 col-md-offset-1 col-lg-offset-1">
				{{range $name, $data := .options}}
					<li class="col-xs-3 col-md-2 col-lg-2" id="menu-service-{{$data}}">
						<a href="/service/{{$data}}" >{{$data}}</a>
					</li>
				{{end}}
			</ul>
		</div>
	</div>

	<!-- 下载 -->
	<div class="container-fluid service-content-1">
		<div class="container">
			<div class="col-md-10 col-lg-10 col-md-offset-1 col-lg-offset-1">
				<ul class="row service-content-1-txt">
					{{range $index, $data := .downList}}
					<li class="col-xs-12 col-md-12 col-lg-12">
						<div class="col-xs-9 col-md-9 col-lg-9 title"><span>{{$data.Title}}</span></div>
						<div class="col-xs-3 col-md-3 col-lg-3 down"><a href="{{$data.DownloadURL}}" download><span>下载</span></a></div>
						<div class="col-xs-12 col-md-6 col-lg-6 service-content-1-txt-body">
							<span>版本：V{{$data.Version}}</span>
						</div>
					</li>
					{{end}}
				</ul>
			</div>
		</div>
	</div>

	<!-- 解答 -->
	<div class="container-fluid service-content-2">
		<div class="container">
			<div class="col-md-10 col-lg-10 col-md-offset-1 col-lg-offset-1">
				{{range $index, $data := .answerList}}
				<ul class="service-content-2-txt">
					<li class="title">
						<pre>{{NumberTransfer $index}}、{{$data.Title}}</pre>
					</li>
					<li>
						<pre>{{$data.Answer}}
						</pre>
					</li>
					<li>
						{{if $data.Img}}
						<img src="{{$data.Img}}" >
						{{end}}
					</li>
				</ul>
				{{end}}
			</div>
		</div>
	</div>

	{{render  "comm/bottom.html"}}

	<script type="text/javascript">
		$(function(){
			//tag高亮
			var title = "服务支持";
			var uri = "-service-{{.name}}";
			if (title) {
				$("#"+title).attr("class","dropdown active");
			}

			if (uri) {
				$("#"+uri).attr("class","active");
				$("#menu"+uri).attr("class","col-xs-3 col-md-2 col-lg-2 active");
			}

			// 点击切换显示详情
			var clicknum = -1;
    		var allnum = 0;
			$(".title > span").click(function(){
				var num = $(this).parent().index(".title");
				if (clicknum == num) {
					//判断奇数次点击还是偶数次点击
					//获取当前allnum的值并加1
					var newnum = parseInt(allnum)+1 ;
					allnum = newnum;
					//如果 #allnum中的值可以整除2  说明是奇数次点击 不能整除 第偶数次点击 （不用清除#allnum的值）
					var residue = newnum % 2;
					if ( residue == 1) {
						//不可以整除2 偶数次点击同一个位置 sort面板移除
						$(".service-content-1-txt-body").css("display","none");

					} else {
						//可以整除2 奇数次点击这个位置 添加sort面板 图片旋转180度
						$(this).parent().siblings(".service-content-1-txt-body").css("display","block");
					}
				}else{
					allnum=0;
					clicknum=num;					//将点击位置排序号赋值到input中
					$(".service-content-1-txt-body").css("display","none");
					$(this).parent().siblings(".service-content-1-txt-body").css("display","block");
				}
			})
		})
	</script>

</body>
</html>
